<!DOCTYPE html>

<html>
<head>

	<link href="../../conf/reports/css/bootstrap.css" rel="stylesheet">

<body class="container">
	<div class="navbar">
		<div class="navbar-inner">
			<a class="brand" href="#">Filter</a>
			<ul class="nav">
				<li><a href="#" id="toggle-in">Incoming</a></li>
				<li><a href="#" id="toggle-out">Outgoing</a></li>
				<li><a href="#" id="toggle-exclamation">Attention</a></li>
				<li><a href="#" id="toggle-unknown">Unknown</a></li>
				<li><a href="#" id="toggle-fail">Fail</a></li>
				<li><a href="#" id="toggle-error">Error</a></li>
				<li><a href="#" id="toggle-issue">Issue</a></li>
				<li><a href="#" id="toggle-success">Success</a></li>
			</ul>
		</div>
	</div>
	<h1>Testresults</h1>

	<table class="table table-striped table-hover">
	<thead>
		<tr>
			<th>&nbsp;</th>
			<th>EVENT</th>
			<th>Timestamp</th>
			<th>TESTCASE</th>
			<th>CONTEXT</th>
			<th>RESULT</th>
		</tr>
	</thead>
	<tbody>	
	<% for @item in @data %>
		<% for @event in @item.events %>

		<tr class="<%= @event.result %> <%= @event.eventId %>">
			<td><input type="checkbox" class="reviewed"></td>
			<td class="eventId">
			<% if @event.eventId.to_s == 'testexecution_begins' %>
			&gt;&gt;
			<% elsif @event.eventId.to_s == 'testexecution_returns' %>
			&lt;&lt;
			<% else %>
			!!
			<% end %>
			
			</td>
			<td><%= @event.timestamp.strftime('%Y-%m-%d %H:%M:%S') %></td>
			<td>
				<a href="<%= @item.source %>" target="logs">
				<%= @item.name %> 				
				</a>, 	
				<% if @item.context != 'unknown-context' %>
				<a href="<%= @item.source %>/<%= @item.context %>/rspec-stderr.txt" target="logs">
				<% else %>			
				<a href="<%= @item.source %>/rspec-stderr.txt" target="logs">
				<% end %>
				rspec-stderr.txt
				</a>
			</td>
			<td class="context">
				<% if @item.context != 'unknown-context' %>
				<%= @item.context %>
				<% end %>
			</td>
			
			<td class="result"><%= @event.result %></td>
		</tr>

		<% end %>
	<% end %>
	</tbody>
	</table>
	
	<script src="../../conf/reports/js/jquery-1.10.2.min.js"></script>
    <script src="../../conf/reports/js/bootstrap.min.js"></script>
	<script src="../../conf/reports/js/script.js"></script>
	
</body>
</html>



